/*
 * RacesItem.h
 *
 *  Created on: 2011-1-15
 *      Author: Administrator
 */

#ifndef RACESITEM_H_
#define RACESITEM_H_

#include <ListItem.h>
#include "Race.h"

class CRacesItem : public CListItem
	{
public:
    static CRacesItem* NewL(const CListBox* aOwner);
	static CRacesItem* NewLC(const CListBox* aOwner);
	virtual ~CRacesItem();
	
public:
	void SetLayout();
	void SetBackImage(CImage* aImage);
	void SetLeftBitmap(CImage* aImage);
	void SetRightBitmap(CImage* aImage);
	void setRace(CRace* aRace);
	CRace* Race();
	void Draw(CWindowGc& gc, const TRect& aRect) const;
//	void DrawFocusEffect(CWindowGc& gc, const TRect& aRect) const{};
//	void DrawLostFocusEffect(CWindowGc& gc, const TRect& aRect) const{};
	
protected:
	CRacesItem();
	void ConstructL(const CListBox* aOwner);
	
protected:
	CImage* iBackImage;
	CImage* iLeftImage;
	CImage* iRightImage;
	CImage* iStateImage;
	CRace* iRace;//not owner
	TRect iLeftRect;
	TRect iRightRect;
	TRect iMidRect;
	};

#endif /* RACESITEM_H_ */
